package te2;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import test.Student;



public class list{

	 public static void main(String[] args) {  
		 
	        List<Student> stu = new ArrayList<Student>();  
	        stu.add(new Student());  
	        stu.add(new Student());  
	        stu.add(new Student());  
	        stu.add(new Student());  
	        stu.add(new Student());  
	        //set���ϱ���������ò�ͬ��ַ�Ķ���  
	        Set<Student> ts = new HashSet<Student>();  
	        ts.addAll(stu);  
	          
	        for (Student student : ts) {  
	            System.out.println(student.getId()+"-"+student.getName()+"-"+student.getAge());  
	        }  
	    }  
	
}
